package priv.stones.io.Scanner.file;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;

/**
 * @Author: Stones
 * @Description:
 * @Date: 2017/10/31 16:04
 */
public class Writer1 {

    public static void main(String[] args) throws IOException {
        File file = new File("e:" + File.separator + "hello" + File.separator + "2.txt");
        if (!file.getParentFile().exists()) {
            file.getParentFile().mkdirs();
        }
        Writer writer = new FileWriter(file,true);
        writer.write("直接写入字符创也可以22221");
        writer.close();



    }

}
